<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>双色球</title>
  <style>
    .box{display: flex;justify-content: center;align-items: center;}
    .cell{box-sizing:border-box;height:36px;width:36px;background:#0092DD;border-radius:50%;margin:0 3px 0 2px;text-align:center;line-height:36px;color:#fff;font-size:20px;}
  </style>
</head>

<body>
  <div class="box">
    <div class="cell"></div>
    <div class="cell"></div>
    <div class="cell"></div>
    <div class="cell"></div>
    <div class="cell"></div>
    <div class="cell"></div>
    <div class="cell"></div>
    <div class="cell"></div>
    <div class="cell"></div>
    <div class="cell"></div>
  </div>
  <div style="text-align: center;margin-top:10px;">
    <button type="button" onclick="start()">点我开球</button>
  </div>

  <script src="js/sscAnimate.js"></script>
  <script>
    const cells = document.querySelectorAll('.cell');
    const balls = [];
    cells.forEach(cell => {
      balls.push(new SSCAnimate({ el: cell }));
    });
    const start = () => {
      balls.forEach(ball => ball.start());
    };
  </script>
</body>

</html>